package com.pzhuweb.sgblog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pzhuweb.sgblog.domain.entity.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 鄧浩奇
 * @classname RoleMapper
 * @description
 * @since 2023/8/6 17:33
 **/

public interface RoleMapper extends BaseMapper<Role> {
    List<String> selectRoleKeysByUserId(@Param("id") Long id);

    List<Long> selectRoleIdsByUserId(Long id);

    List<Role> selectRolesByUserId(Long id);

    void deleteRoleIdsByUserId(Long id);

    void saveRoleIdsByUserId(@Param("id") Long id, @Param("roleId") Long roleId);

    void insertById(@Param("roleId") Long roleId, @Param("menuId") Long menuId);
}
